// program to illustrate unary oprator overloading 


#include<iostream.h>
#include<conio.h>

class space 
{
int x,y,z;

public:

void getdata()
{
cout<<"Enter the dimentions";
cin>>x>>y>>z;

}
void putdata()
{
cout<<"x="<<x<<"\ty="<<y<<"\tz="<<z<<"\n";

}

void opreator -()
{
x=-x;
y=-y;
z=-z;

}

};

void main()
{
space s;
clrscr();

s.getdata();
s.putdata();
-s;
s.putdata();
getch();
}
/*
output:
Enter the dimensions: 12 13 14
x=12   y=13    z=14
x=-12  y=-13  z=-14
*/